#include "app1.hpp"
#include <unistd.h>

int main(int argc, char *argv[])
{
    //模拟客户端序列化
    Request req(12364566, 43454356, '+');
    std::string s;
    req.Serialize(&s);
    std::string s1 = Encode(s);//添加报头
    std::cout << s1 <<std::endl<<std::endl;

    //模拟服务器反序列化
    std::string con;
    Decode(s1,&con);
    std::cout <<"去除报头:"<< con <<std::endl;
    Request temp;
    temp.Deserialize(con);
    temp.DebugPrint();

    
    return 0;
}